package top.kaoshanji.p3ch12a;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

/**
 * 代码清单-p3ch12a-381页b：泛型类型中的静态域
 * author kaoshanji
 * ^_^
 * create time 2025/2/6 10:32
 */
public class StaticField<T> {

    private static final Logger logger = LogManager.getLogger(StaticField.class);

    public static void main(String[] args) {
        logger.info("...代码清单-p3ch12a-381页b：泛型类型中的静态域...");

        new StaticField<String>();
        new StaticField<Integer>();

        logger.info("...此时count的值：{}...", StaticField.count);

    }

    private static int count = 0;

    public StaticField() {
        count++;
    }

}
